Home | GR32 |
function Fixed(S: Single): TFixed; overload;
function Fixed(I: Integer): TFixed; overload;
A couple of TFixed constructors.
In case you don't want your program to loose time on extra function call, you can use another method of converting Integer to TFixed:
var
FX: TFixed;
begin
FX := IntVal shl 16;
...
end;
function FixedFloor(A: TFixed): Integer;
An analogue to Floor function.
function FixedCeil(A: TFixed): Integer;
An implementation of the Ceil function for TFixed type.
function FixedMul(A, B, TFixed): TFixed;
This is the same as using MulDiv(A, B, $10000).
function FixedDiv(A, B, TFixed): TFixed;
This is the same as using MulDiv(A, $10000, B).
function FixedRound(A, B, TFixed): TFixed;
Provides correct rounding of fixed-point values.
Copyright ©2000-2004 Alex Denisov and Contributors - Graphics32 v1.7.1 - Build on 25-Februar-2005